package com.dev.base.able;

import ohos.agp.components.Component;

/**
 * detail: 基类 ViewBinding 接口
 * @author Ttt
 */
public interface IDevBaseViewBinding<DataBinding> {

    /**
     * View Bind 初始化操作
     * @param layoutId  [layoutId]
     * @param context [context]
     */
    public DataBinding viewBinding(int layoutId, ohos.app.Context context);

    /**
     * 获取待 Bind View
     */
    public Component getBindingView();

    /**
     * 是否 Bind View
     */
    public default Boolean isViewBinding()  {
        return true;
    }

    /**
     * 是否分离 ( 销毁 ) Binding
     */
    public default Boolean isDetachBinding() {
        return isViewBinding();
    }
}
